import request from '@/utils/request'

const api = {
  getReportPageUrl: '/report/get_report_page',
  getReportByPkMidUrl: '/report/get_report_by_pkmid',
  queryPickingBoxUrl: '/base_picking_box/query_picking_box',
  mesReportMoldUrl: '/report/mes_report_mold',
  mesReportAloneUrl: '/report/mes_report_alone',
  getReportBillUrl: 'report/get_report_bill',
}

export async function getReportBillApi(params: Map<string, any>) {
  const res = await request({
    url: api.getReportBillUrl,
    method: 'get',
    params,
  })
  return res
}

export async function mesReportAloneApi(params: Map<string, any>) {
  const res = await request({
    url: api.mesReportAloneUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function mesReportMoldApi(params: Map<string, any>) {
  const res = await request({
    url: api.mesReportMoldUrl,
    method: 'post',
    data: params,
  })
  return res
}

export async function queryPickingBoxApi(params: Map<string, any>) {
  const res = await request({
    url: api.queryPickingBoxUrl,
    method: 'get',
    params,
  })
  return res
}

export async function getReportByPkMidApi(params: Map<string, any>) {
  const res = await request({
    url: api.getReportByPkMidUrl,
    method: 'get',
    params,
  })
  return res
}

export async function getReportPageApi(params: Map<string, any>) {
  const res = await request({
    url: api.getReportPageUrl,
    method: 'post',
    data: params,
  })
  return res
}
